home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / ubelt11a.zip / BELT.DOC < prev    next >
Text File  |  1992-02-09  |  86KB  |  2,238 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                   =========
  13.           ===============================    U t i l i t y
  14.                   =     ====o  o  o  o
  15.           ===============================    B e l t        v1.1a
  16.                   =========
  17.  
  18.  
  19.                              Shareware Utility Collection
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                               Copyright 1990, 1991, 1992
  36.  
  37.                                Herne Data Systems Ltd.
  38.  
  39.                                       PO Box 250
  40.                                 Tiverton, ON  N0G 2T0
  41.  
  42.                                         CANADA
  43.  
  44.  
  45.                              voice or FAX (519) 366-2732
  46.  
  47.  
  48.                                 CompuServe 72060,1153
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                              Software worth hunting for!
  61.  
  62.  
  63.           TABLE OF CONTENTS
  64.  
  65.           SHAREWARE REGISTRATION FORM . . . . . . . . . . . . . . . . .  ii
  66.  
  67.           THE FINE PRINT  . . . . . . . . . . . . . . . . . . . . . . . iii
  68.                DISCLAIMER - AGREEMENT   . . . . . . . . . . . . . . . . iii
  69.                REGISTRATION BENEFITS  . . . . . . . . . . . . . . . . .  iv
  70.                REGISTRATION AND CUSTOMER SUPPORT ADDRESS  . . . . . . .  iv
  71.                ASP OMBUDSMAN  . . . . . . . . . . . . . . . . . . . . .  iv
  72.                DEFINITION OF SHAREWARE  . . . . . . . . . . . . . . . .   v
  73.  
  74.           INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . .   1
  75.                TERMINOLOGY AND CONVENTIONS  . . . . . . . . . . . . . .   3
  76.                DOS ERRORLEVEL and Batch Files . . . . . . . . . . . . .   5
  77.  
  78.           INTERACTIVE UTILITIES . . . . . . . . . . . . . . . . . . . .   7
  79.                SELECT.COM . . . . . . . . . . . . . . . . . . . . . . .   7
  80.                CONFIRM.COM  . . . . . . . . . . . . . . . . . . . . . .  10
  81.                WAIT.COM . . . . . . . . . . . . . . . . . . . . . . . .  11
  82.                GETKEY.COM . . . . . . . . . . . . . . . . . . . . . . .  12
  83.                SLEEP.COM  . . . . . . . . . . . . . . . . . . . . . . .  13
  84.                BLEEP.COM  . . . . . . . . . . . . . . . . . . . . . . .  14
  85.  
  86.           VIDEO UTILITIES . . . . . . . . . . . . . . . . . . . . . . .  17
  87.                VPSET.COM  . . . . . . . . . . . . . . . . . . . . . . .  17
  88.                VPCOPY.COM . . . . . . . . . . . . . . . . . . . . . . .  18
  89.                VPFLIP.COM . . . . . . . . . . . . . . . . . . . . . . .  19
  90.                VPCLS.COM  . . . . . . . . . . . . . . . . . . . . . . .  20
  91.                     Table 1: Screen Colors  . . . . . . . . . . . . . .  21
  92.                VPSTRIPE.COM . . . . . . . . . . . . . . . . . . . . . .  22
  93.                VPTNT.COM  . . . . . . . . . . . . . . . . . . . . . . .  22
  94.                VPBH.COM . . . . . . . . . . . . . . . . . . . . . . . .  23
  95.                VPAT.COM . . . . . . . . . . . . . . . . . . . . . . . .  24
  96.                VPBOX.COM  . . . . . . . . . . . . . . . . . . . . . . .  25
  97.                     Table 2: Border Styles  . . . . . . . . . . . . . .  27
  98.  
  99.           SECURITY AND DIAGNOSTIC UTILITIES . . . . . . . . . . . . . .  28
  100.                HANG.COM . . . . . . . . . . . . . . . . . . . . . . . .  28
  101.                REBOOT.COM . . . . . . . . . . . . . . . . . . . . . . .  29
  102.                WHATIS.COM . . . . . . . . . . . . . . . . . . . . . . .  31
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.                                                                           i
  117.  
  118.                              SHAREWARE REGISTRATION FORM
  119.  
  120.      Fill out this form and mail with your cheque, money order or VISA card
  121.      number to:
  122.  
  123.           Herne Data Systems Ltd., PO Box 250, Tiverton, ON, CANADA  N0G 2T0
  124.  
  125.  
  126.      Please register my copy of Utility_Belt Collection  for $25 (US),     [ ]
  127.      $29 (CDN), plus $2 p & h. 
  128.  
  129.      Please register my copy of _______________ from the Utility_Belt      [ ]
  130.      collection for $10 (US) or $12 (CDN), plus $2 p & h
  131.  
  132.      Disk size required  720 k - 3.5" [ ]      360 k - 5.25" [ ]
  133.  
  134.      Please send me the Herne Data Systems Shareware Evaluation Pak for    [ ]
  135.      $5 plus $2 p & h (Evaluation copies of all Herne Data Systems 
  136.      shareware products including MAXI-Form, Utility_Belt, Over_LAZ  
  137.      and NPS Nominal Pipe Size) (3.5" disk only)
  138.  
  139.      Please send me more information on LAN and Site Licenses              [ ]
  140.  
  141.  
  142.      Cheque or money order enclosed   [ ]    or charge my VISA card*  [ ]   
  143.  
  144.      VISA # _____/_____/_____/_____     Expiry __/__   Total Amount* __________
  145.  
  146.      Phone # (_____) _____-________     Signature _____________________________
  147.  
  148.      NOTE:     * All VISA orders will be charged in CANADIAN DOLLARS.  
  149.                  VISA orders can be FAXed to (519) 366-2732 for faster service.
  150.  
  151.      Name      __________________________________________________________
  152.  
  153.      Address   __________________________________________________________
  154.  
  155.      City      ____________________________       Prov/State_____________
  156.  
  157.      Zip       ____________________________       Country   _____________
  158.  
  159.      Canadian orders include GST.  PST must be added to total charge for ONTARIO
  160.      residents.  
  161.  
  162.      Please add $4.00 postage and handling for shipments outside CANADA and the
  163.      USA.  Payment for international orders can be made by VISA card,
  164.      international money order (in US$ or CDN$), or Eurochecks in the currency
  165.      of the issuing country (e.g. Sterling, Francs and most other other major
  166.      currencies).
  167.  
  168.      All orders are shipped by first class air mail.  Please allow two weeks for
  169.      delivery.  Sorry, we cannot accept COD orders.
  170.  
  171.  
  172.  
  173.                                                                               ii
  174.  
  175.  
  176.           Utility_Belt v1.1a                                Users' Guide
  177.           --------------------------------------------------------------
  178.  
  179.  
  180.                                     THE FINE PRINT
  181.  
  182.            
  183.           DISCLAIMER - AGREEMENT 
  184.            
  185.           Users of the Utility_Belt shareware collection must accept this
  186.           disclaimer of warranty: 
  187.  
  188.                "The software programs comprising the Utility_Belt
  189.                collection are supplied as is.  The author disclaims all
  190.                warranties, expressed or implied, including, without
  191.                limitation, the warranties of merchantability and of fitness
  192.                for any purpose. The author assumes no liability for
  193.                damages, direct or consequential, which may result from the
  194.                use of any of the Utility_Belt software programs.  Herne
  195.                Data Systems reserves the right to make changes, additions
  196.                and deletions to the Utility_Belt Collection at any time
  197.                without prior notice." 
  198.            
  199.           This evaluation version of the Utility_Belt collection is a
  200.           "shareware program" and is provided at no charge to the user for
  201.           evaluation.  Feel free to share it with your friends, but please
  202.           do not give it away altered or as part of another system.  The
  203.           essence of "user-supported" software is to provide personal
  204.           computer users with quality software without high prices, and yet
  205.           to provide incentive for programmers to continue to develop new
  206.           products.  If you find any of the programs useful and find that
  207.           you continue to use any of the Utility_Belt programs after a 30
  208.           day trial period, you must make a registration payment of $10
  209.           (US), $12 (CDN) (plus $2 postage and handling) for any single
  210.           program in the Utility_Belt collection, or $25 (US), $29 (CDN)
  211.           (plus $2 postage and handling) for the entire collection to Herne
  212.           Data Systems Ltd.  Cheque, money order, VISA credit card and
  213.           corporate/institutional purchase orders are accepted.  The single
  214.           user registration fee will license one copy for use on any one
  215.           computer at any one time.  You must treat this software just like
  216.           a book.  An example is that this software may be used by any
  217.           number of people and may be freely moved from one computer
  218.           location to another, so long as there is no possibility of it
  219.           being used at one location while it's being used at another. Just
  220.           as a book cannot be read by two different persons at the same
  221.           time. 
  222.            
  223.           Commercial, corporate and institutional users of Utility_Belt
  224.           must register and pay for their copies of Utility_Belt within 30
  225.           days of first use or their license is withdrawn.  Site Licenses
  226.           are available for $50 (US) or $55 (CDN) for any individual
  227.           program, or $125 (US) or $135 (CDN) for the entire collection
  228.           directly from Herne Data Systems Ltd.
  229.            
  230.           Any individual, corporation or institution distributing
  231.  
  232.                                                                         iii
  233.  
  234.  
  235.           Utility_Belt v1.1a                                Users' Guide
  236.           --------------------------------------------------------------
  237.  
  238.           Utility_Belt for any kind of remuneration must first contact
  239.           Herne Data Systems Ltd. at the address below for authorization. 
  240.           This authorization will be granted automatically to distributors
  241.           recognized by the ASP as adhering to its guidelines for shareware
  242.           distributors, and such distributors may begin offering
  243.           Utility_Belt immediately (However Herne Data Systems Ltd. must
  244.           still be advised so that the distributor can be kept up-to-date
  245.           with the latest version of Utility_Belt.). 
  246.            
  247.           You are encouraged to pass a copy of Utility_Belt along to your
  248.           friends for evaluation.  Please encourage them to register their
  249.           copy if they find that they can use it.  
  250.  
  251.  
  252.           REGISTRATION BENEFITS
  253.  
  254.           All registered users will receive a copy of the latest version of
  255.           the Utility_Belt system, along with free technical support and
  256.           upgrades for 60 days.
  257.  
  258.           Registered users can also upgrade to later versions (beyond the
  259.           initial 60 day free support period) for a nominal update fee of
  260.           $5 plus $2 postage and handling.  (US or CDN funds).
  261.  
  262.  
  263.           REGISTRATION AND CUSTOMER SUPPORT ADDRESS
  264.  
  265.           Please address all registration requests and customer support
  266.           inquiries to:
  267.  
  268.                     Herne Data Systems Ltd.,  
  269.                     PO Box 250, Tiverton, ON  N0G 2T0  CANADA
  270.  
  271.                     voice or FAX   (519)366-2732
  272.  
  273.           You may also leave comments (we welcome all feedback - either
  274.           positive or negative) addressed to CompuServe ID 72060,1153.
  275.            
  276.  
  277.  
  278.           ASP OMBUDSMAN
  279.  
  280.           This program is produced by a member of the Association of
  281.           Shareware Professionals (ASP).  ASP wants to make sure that the
  282.           shareware principle works for you.  If you are unable to resolve
  283.           a shareware-related problem with an ASP member by contacting the
  284.           member directly, ASP may be able to help.  The ASP Ombudsman can
  285.           help you resolve a dispute or problem with an ASP member, but
  286.           does not provide technical support for members' products.  Please
  287.           write to the ASP Ombudsman at: 545 Grover Road, Muskegon, MI
  288.           49442  USA  or send a Compuserve message via easyplex to ASP
  289.           Ombudsman 70007,3536 
  290.  
  291.                                                                          iv
  292.  
  293.  
  294.           Utility_Belt v1.1a                                Users' Guide
  295.           --------------------------------------------------------------
  296.  
  297.  
  298.  
  299.           DEFINITION OF SHAREWARE 
  300.            
  301.           Shareware distribution gives users a chance to try software
  302.           before buying it. If you try a Shareware program and continue
  303.           using it after a reasonable evaluation period, you are expected
  304.           to register. Individual programs differ on details -- some
  305.           request registration while others require it, some specify a
  306.           maximum trial period. With registration, you get anything from
  307.           the simple right to continue using the software to an updated
  308.           program with printed manual. 
  309.            
  310.           Copyright laws apply to both Shareware and commercial software,
  311.           and the copyright holder retains all rights, with a few specific
  312.           exceptions as stated below. Shareware authors are accomplished
  313.           programmers, just like commercial authors, and the programs are
  314.           of comparable quality. (In both cases, there are good programs
  315.           and bad ones!) The main difference is in the method of
  316.           distribution. The author specifically grants the right to copy
  317.           and distribute the software, either to all and sundry or to a
  318.           specific group. For example, some authors require written
  319.           permission before a commercial disk vendor may copy their
  320.           Shareware. 
  321.            
  322.           Shareware is a distribution method, not a type of software. You
  323.           should find software that suits your needs and pocketbook,
  324.           whether it's commercial or Shareware. The Shareware system makes
  325.           fitting your needs easier, because you can try before you buy.
  326.           And because the overhead is low, prices are low also. Shareware
  327.           has the ultimate money-back guarantee -- if you don't use the
  328.           product, you don't pay for it. 
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                                                                           v
  351.  
  352.  
  353.           Utility_Belt v1.1a                                Users' Guide
  354.           --------------------------------------------------------------
  355.  
  356.  
  357.                                      INTRODUCTION
  358.  
  359.           Add some pizzazz to your batch files!  Utility_Belt is a
  360.           collection of batch file, security and diagnostic utilities
  361.           designed to give an advanced, professional look to even the
  362.           simplest of batch files.  Each program was designed for a
  363.           specific purpose.  To see a demonstration of the programs in
  364.           action, run the batch file BELTDEMO.BAT.  The various programs
  365.           outlined below are used extensively in this demonstration.  Feel
  366.           free to copy and modify parts of the demo batch file for your own
  367.           batch files.
  368.  
  369.                                        * * * *
  370.  
  371.                THIS DOCUMENTATION ASSUMES THAT THE READER IS
  372.                REASONABLY FAMILIAR WITH MS-DOS AND BATCH FILE
  373.                CONCEPTS.  HOWEVER, BY FOLLOWING THE EXAMPLES GIVEN IN
  374.                THE TEXT, EVEN A RELATIVELY IN-EXPERIENCED USER CAN
  375.                CREATE PROFESSIONAL LOOKING BATCH FILES WITH EASE!
  376.  
  377.                                        * * * *
  378.  
  379.  
  380.           The following programs are included in the Utility_Belt
  381.           collection:
  382.  
  383.           Interactive Utilities:
  384.  
  385.           SELECT    Allows a user to choose from a list of options and can
  386.                     be used to direct the flow of the batch file
  387.                     accordingly.  SELECT is typically used for a menu type
  388.                     system.
  389.  
  390.           CONFIRM   Prompts the user for a Yes/No response and can be used
  391.                     to direct the flow of the batch file accordingly. 
  392.                     CONFIRM is typically used prior to executing any action
  393.                     which may be destructive, such as erasing a file.
  394.  
  395.           WAIT      Prompts the user to procede or quit and can be used to
  396.                     direct the flow of the batch file accordingly.  WAIT is
  397.                     typically used to prompt a user to do something (like
  398.                     swap disks) before proceding.
  399.  
  400.           GETKEY    Waits for a key press from the keyboard and returns a
  401.                     value based on the ASCII code of the key pressed. 
  402.                     GETKEY is typically used for custom menu type programs.
  403.  
  404.           SLEEP     Pauses the computer for the specified length of time. 
  405.                     SLEEP is typically used to pause momentarily while a
  406.                     message is displayed on the screen.
  407.  
  408.  
  409.                                                                           1
  410.  
  411.  
  412.           Utility_Belt v1.1a                                Users' Guide
  413.           --------------------------------------------------------------
  414.  
  415.           BLEEP     Sounds a user defined tone (or series of tones) on the
  416.                     speaker.  BLEEP is typically used prior to any special
  417.                     alert or warning messages which are displayed by the
  418.                     batch file.
  419.  
  420.  
  421.  
  422.           Video Utilities:
  423.  
  424.           VPSET     Set the current video display page for text modes. 
  425.                     VPSET is typically used to build a screen with the
  426.                     other video utilities (e.g. VPCOPY, VPCLS, VPBOX, etc.)
  427.                     then switch to it instantly.
  428.  
  429.           VPCOPY    Copy one video text page to another.  This allows a
  430.                     text page to be saved then recalled later.
  431.  
  432.           VPFLIP    Let the user flip instantly between alternate display
  433.                     pages that have been created with the other video
  434.                     programs.
  435.  
  436.           VPCLS     Clear the screen of the specified video page to a
  437.                     specified color.
  438.  
  439.           VPTNT     Clear the current screen to the specified colors in an
  440.                     explosive effect.
  441.  
  442.           VPBH      Clear the current screen to the specified colors in a
  443.                     'black hole' effect.
  444.  
  445.           VPSTRIPE  Similar to VPCLS, but will produce a striped or rainbow
  446.                     pattern on the screen.  Stripes can be horizontal or
  447.                     vertical.
  448.  
  449.           VPAT      Print a text string at a specified location on the
  450.                     screen.
  451.  
  452.           VPBOX     Draws a box of a given size at a given location on the
  453.                     screen.  Typically used with VPAT to create message
  454.                     windows on a screen.
  455.  
  456.  
  457.  
  458.           Security and Diagnostic Utilities:
  459.  
  460.           HANG      Will lock up a computer and require a power-off/power-
  461.                     on reset sequence.  HANG is typically used to lock up a
  462.                     computer if, for example, a user fails on several
  463.                     attempts to log into a network.
  464.  
  465.           REBOOT    Software controlled rebooting of the computer.  REBOOT
  466.                     is typically used after changing or creating a
  467.  
  468.                                                                           2
  469.  
  470.  
  471.           Utility_Belt v1.1a                                Users' Guide
  472.           --------------------------------------------------------------
  473.  
  474.                     customized CONFIG.SYS file.  It can also be used to
  475.                     automatically reset a computer if a user fails to log
  476.                     into a network correctly.
  477.  
  478.           WHATIS    A diagnostic program which reports the BIOS and DOS
  479.                     physical and logical parameters associated with disk
  480.                     drives.
  481.  
  482.  
  483.           All of the programs in the Utility_Belt collection were written
  484.           in assembler to ensure compact, fast code.  (The average size of
  485.           the programs is less than 2k bytes long!)  Each of the programs
  486.           is self documenting to a certain extent.  If you run the programs
  487.           without any command line options, you will get a summary of the
  488.           syntax and available options.
  489.  
  490.           In addition to the main programs, the Utility_Belt collection
  491.           disk will contain other related files:
  492.  
  493.           ASP.COM        Displays the Association of Shareware
  494.                          Professionals ombudsman message.
  495.  
  496.           BELTDEMO.BAT   A demonstration batch file which incorporates the
  497.                          various programs of the Utility_Belt collection. 
  498.                          Run this file for a good overview.
  499.  
  500.           BELT.DOC       This documentation file.
  501.  
  502.           BELT1xx.ZIP    A ZIP file which contains all of the other files
  503.                          on the disk.  You can upload this file to all of
  504.                          your favorite BBS's, or pass it around to your
  505.                          friends.
  506.  
  507.           UPDATE.DOC     A summary of new features added since the last
  508.                          release.  This file may not be present, depending
  509.                          on the version.
  510.  
  511.           CATALOG.DOC    This file contains a listing of other exciting
  512.                          Herne Data Systems Ltd. shareware and commercial
  513.                          software products.
  514.  
  515.  
  516.  
  517.           TERMINOLOGY AND CONVENTIONS
  518.  
  519.           All of the programs in the Utility_Belt collection are 'command
  520.           line driven' (i.e. they rely on options specified on the command
  521.           line to determine what they should do).  In this documentation,
  522.           curly braces { } are used to denote the names of parameters that
  523.           must be supplied for each program, e.g. {list_name}.  Parameters
  524.           which are also enclosed in square brackets [ ] are optional (e.g.
  525.           [{item_10}]).  If optional parameters are not specified, default
  526.  
  527.                                                                           3
  528.  
  529.  
  530.           Utility_Belt v1.1a                                Users' Guide
  531.           --------------------------------------------------------------
  532.  
  533.           values are assumed.  
  534.  
  535.           Numeric values are entered in normal ASCII decimal fashion (i.e.
  536.           10 is the number ten).  Text string entries can be any
  537.           combination of normally printable characters.  Case sense
  538.           (uppercase and lowercase) are preserved for text strings. 
  539.           Embedded spaces (i.e. the space left between words) are generally
  540.           allowed, but leading spaces (i.e. any blanks at the beginning of
  541.           the text) are automatically removed.  ("This ==>  <== is an
  542.           embedded space".  "  <== This is a leading space.")  Any of the
  543.           numeric values or strings can include or be substituted by the
  544.           DOS batch file variables (%1, %2, etc.) to provide more
  545.           flexibility.
  546.  
  547.           The required parameters and default values for any optional
  548.           parameters are listed below in the description for each program. 
  549.           Examples of usage for each program are also given.  In all cases,
  550.           neither the curly braces, nor the square brackets are actually
  551.           typed on the command line. 
  552.            
  553.           With the exception of SELECT, all programs requiring multiple
  554.           parameters must have these parameters separated on the command
  555.           line by at least one space character.  In order to allow embedded
  556.           spaces in the parameter strings, SELECT uses a semi-colon ; as a
  557.           parameter separator character.
  558.  
  559.           For programs which take a can take a long list of optional
  560.           parameters (such as SELECT and VPFLIP), three dots ... indicates
  561.           that you can continue on with similar parameters, up to the
  562.           maximum number specified by the program.
  563.  
  564.           Angle brackets < > (a.k.a. less than and greater than signs) are
  565.           used to denote special keys on the keyboard.  For example, <Esc>
  566.           refers to the single key marked ESC or ESCAPE; while <Enter>
  567.           refers to the ENTER or RETURN key.
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.                                                                           4
  587.  
  588.  
  589.           Utility_Belt v1.1a                                Users' Guide
  590.           --------------------------------------------------------------
  591.  
  592.           DOS ERRORLEVEL and Batch Files
  593.  
  594.           This documentation is not intended to be a comprehensive course. 
  595.           I know this is obvious, but it is worth saying anyway: One of the
  596.           most often overlooked sources of information is the manuals and
  597.           user guides which come with MS-DOS!  If you want a different
  598.           perspective on batch files, there are many excellent books and
  599.           magazine articles about MS-DOS batch file programming at all
  600.           levels from introductory to advanced. 
  601.           However, before describing each program, a brief description of
  602.           how DOS responds to the interactive utilities is in order.
  603.  
  604.           The user response utilities in the collection (SELECT, WAIT and
  605.           CONFIRM, and GETKEY) rely on the DOS ERRORLEVEL variable to
  606.           direct batch file flow.  In order for the batch files to function
  607.           correctly, a basic understanding of ERRORLEVEL is required.
  608.  
  609.           When any program terminates and returns control to DOS (or the
  610.           batch file which initiated it), it can set a DOS variable called
  611.           ERRORLEVEL.  Normally, this would have a value of 0 which
  612.           indicates that the program successfully completed its task. 
  613.           Other values can be set and may indicate either an error in the
  614.           program, or some other data that the program wishes to pass on to
  615.           subsequent programs in a batch file.  This value can be detected
  616.           and used to control the flow in batch files.  The general
  617.           procedure in a batch file is:
  618.  
  619.                program_or_command_name
  620.                IF ERRORLEVEL x GOTO {label}
  621.  
  622.           where program_or_command_name is the name of a DOS command, .EXE,
  623.           .BAT or .COM program file (e.g. FORMAT), x is the value (from 0
  624.           to 255) and [label] is a statement in the batch file to go to. 
  625.           For example:
  626.  
  627.                IF ERRORLEVEL 5 GOTO ITEM5
  628.                IF ERRORLEVEL 4 GOTO ITEM4
  629.                IF ERRORLEVEL 3 GOTO ITEM3
  630.                IF ERRORLEVEL 2 GOTO ITEM2
  631.                IF ERRORLEVEL 1 GOTO ITEM1
  632.  
  633.           :ITEM5
  634.           (some commands here)
  635.           :ITEM4
  636.           (some more commands here)
  637.           :ITEM3
  638.           (etc)
  639.           :ITEM2
  640.           (etc)
  641.           :ITEM1
  642.           (etc)
  643.  
  644.  
  645.                                                                           5
  646.  
  647.  
  648.           Utility_Belt v1.1a                                Users' Guide
  649.           --------------------------------------------------------------
  650.  
  651.           Notice that the IF ERRORLEVEL x statements are arranged from
  652.           highest value to lowest value.  This is required due to a quirk
  653.           in DOS.  The IF ERRORLEVEL command actually does a 'greater than
  654.           or equal' type of comparison.  If ERRORLEVEL was 5 and the first
  655.           statement was IF ERRORLEVEL 1, then since 5 is greater than or
  656.           equal to 1, the statement would be executed, which is not what we
  657.           would normally want.  All this may seem a bit confusing at first,
  658.           but if you remember that all IF ERRORLEVEL statements must be
  659.           arranged in descending order (i.e. from high to low as shown in
  660.           the example above), then you can't go wrong.
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.                                                                           6
  705.  
  706.  
  707.           Utility_Belt v1.1a                                Users' Guide
  708.           --------------------------------------------------------------
  709.  
  710.  
  711.                                 INTERACTIVE UTILITIES
  712.  
  713.  
  714.           One of the most frequent complaints about DOS batch file
  715.           programming is the inability to get meaningful input from the
  716.           user.  Sure, DOS batch files have the 'PAUSE' command, but all
  717.           that does is ask you to press a key.  The batch file programmer
  718.           has no easy way to tell which key was pressed.
  719.  
  720.           The five interactive utilities (SELECT, WAIT, CONFIRM, GETKEY and
  721.           SLEEP) in the Utility_Belt allow the programmer to check which
  722.           key was pressed and direct the flow of batch file accordingly. 
  723.           Each utility that reads a key press will clear the keyboard
  724.           buffer before getting the key.  This prevents extraneous key
  725.           presses from disrupting the batch file (e.g. if an over-anxious
  726.           user presses a key before they should).  
  727.  
  728.  
  729.  
  730.           SELECT.COM
  731.  
  732.           SELECT allows a user to choose an option from a list of items and
  733.           direct the flow of the batch file accordingly.  It can be used
  734.           for anything from simple user queries to a sophisticated menuing
  735.           system.  SELECT will set the DOS ERRORLEVEL value corresponding
  736.           to the selected choice.  Two syntaxes are supported.  The first
  737.           is:
  738.  
  739.                SELECT {list_name};{item_1};[{item_2}; ... ;{item_10}]
  740.  
  741.           where:    {list_name}    A title that is printed in the menu
  742.                                    title block.  The title can be up to 20
  743.                                    characters long.  Longer titles will be
  744.                                    truncated to 20 characters.
  745.  
  746.                     {item_1} (etc) The items in the menu list.  Up to 10
  747.                                    items can be listed, each up to 15
  748.                                    characters long.  Longer items will be
  749.                                    truncated to 15 characters.
  750.  
  751.           The total length of the text string must be less than 120
  752.           characters.  Each item in the list must be separated by a semi-
  753.           colon (;).  All printable characters (except ; which is used as
  754.           the separator, or /N at the beginning of {list_name} which is
  755.           used as a switch to denote the second form of the command),
  756.           including embedded spaces, are allowed.  Uppercase and lowercase
  757.           letters are preserved.  SELECT  will print a header message which
  758.           includes the {list_name}, followed by the item list and a footer
  759.           message which prompts the user to press the key 'A' to x, where x
  760.           depends on the number of items in the list.  SELECT will accept
  761.           either uppercase or lowercase key press responses.  If the <Esc>
  762.  
  763.                                                                           7
  764.  
  765.  
  766.           Utility_Belt v1.1a                                Users' Guide
  767.           --------------------------------------------------------------
  768.  
  769.           key is pressed, SELECT will return an error code corresponding to
  770.           'no selection made'.  If any other key is pressed, SELECT will
  771.           beep and wait for the next key press.
  772.  
  773.           For example:
  774.  
  775.                SELECT Main Menu;WordProcessor;SpreadSheet;Graphics;Utilties
  776.  
  777.           will display the following menu on the screen:
  778.  
  779.  
  780.                  Main Menu
  781.  
  782.                     A: WordProcessor
  783.                     B: SpreadSheet
  784.                     C: Graphics
  785.                     D: Utilities
  786.  
  787.                  PRESS: 'A' to 'D' letter key to select an item; or
  788.                         <Esc> to QUIT without selecting any.
  789.  
  790.           When one of the available choices is made, SELECT will return the
  791.           following ERRORLEVEL values:
  792.  
  793.           --------------+-----------------
  794.           Key Pressed    ERRORLEVEL value
  795.           --------------+-----------------
  796.                <Esc>     0
  797.                A         1
  798.                B         2
  799.                C         3
  800.                D         4
  801.           etc
  802.                J         10
  803.           --------------+-----------------
  804.  
  805.  
  806.           The second syntax supported by SELECT is:
  807.  
  808.                SELECT /N{nn}
  809.  
  810.           where {nn} is the number of choices, from 1 to 10.  With this
  811.           form, no header, menu list or footer messages are displayed. 
  812.           SELECT will just wait for a key to be pressed (within the range
  813.           of 'A' to x, or <Esc>, as above), then return the corresponding
  814.           ERRORLEVEL value.  For example:
  815.  
  816.                SELECT /N5
  817.  
  818.           will wait for a key press in the range of A to E, or <Esc> and
  819.           then return an ERRORLEVEL value of 1 to 5 or 0.  
  820.  
  821.  
  822.                                                                           8
  823.  
  824.  
  825.           Utility_Belt v1.1a                                Users' Guide
  826.           --------------------------------------------------------------
  827.  
  828.           Continuing with the first example listed above, a sample batch
  829.           file (MENU1.BAT) using SELECT might consist of:
  830.  
  831.                REM ===   MENU1.BAT
  832.                @ECHO OFF
  833.                :MAIN
  834.  
  835.                REM ===   clear screen and display menu options
  836.                CLS
  837.                SELECT Main Menu;WordProcessor;SpreadSheet;Graphics;Utilties
  838.  
  839.                REM ===   interpret ERRORLEVEL codes and branch to selection
  840.                IF ERRORLEVEL 4 GOTO UTIL
  841.                IF ERRORLEVEL 3 GOTO GRAPH
  842.                IF ERRORLEVEL 2 GOTO SPREAD
  843.                IF ERRORLEVEL 1 GOTO WORDPRO
  844.  
  845.                REM ===   ERRORLEVEL = 0 if <Esc> key pressed
  846.                ECHO NO SELECTION MADE
  847.                GOTO END
  848.  
  849.                REM ===   execute main menu selections
  850.                :UTIL
  851.  
  852.                REM ===   present a sub-menu
  853.                CLS
  854.                SELECT Utility Menu;Norton;MAXI Disk
  855.                IF ERRORLEVEL 2 GOTO NOR
  856.                IF ERRORLEVEL 1 GOTO MAX
  857.                REM ===   return to main menu if <Esc> pressed on sub-menu
  858.                GOTO MAIN
  859.  
  860.                :NOR
  861.                CD\UTILITY
  862.                NU
  863.                GOTO MAIN
  864.  
  865.                :MAX
  866.                CD\MAXIDISK
  867.                MAX3
  868.                GOTO MAIN
  869.                :GRAPH
  870.                CD\GRAPH
  871.                HG
  872.                GOTO MAIN
  873.  
  874.                :SPREAD
  875.                CD\SPREAD
  876.                123
  877.                GOTO MAIN
  878.  
  879.                :WORDPRO
  880.  
  881.                                                                           9
  882.  
  883.  
  884.           Utility_Belt v1.1a                                Users' Guide
  885.           --------------------------------------------------------------
  886.  
  887.                CD\WORDPRO
  888.                WP
  889.                GOTO MAIN
  890.  
  891.                :END
  892.  
  893.           As shown with item 4 in the main menu list (:UTIL), several
  894.           levels of SELECT can be 'nested' or used in a batch file menu
  895.           system to create multiple menu levels.  In the above example, as
  896.           each program ends, the user will be returned to the start of the
  897.           main menu.  Also, if the <Esc> key is pressed on the main menu,
  898.           the user will exit to DOS.  If the <Esc> key is pressed while in
  899.           the Utilities sub-menu, the user will be returned to the top of
  900.           the main menu.
  901.  
  902.           If no parameters are specified on the command line, SELECT will
  903.           display a summary of the program options.  
  904.  
  905.  
  906.  
  907.           CONFIRM.COM
  908.  
  909.           CONFIRM will display a prompt and accept a Y (for yes) or N (for
  910.           no) key input.  All other key presses will produce an error beep
  911.           and will be ignored.  CONFIRM is used to present a YES/NO
  912.           question and will return an ERRORLEVEL of 0 for a yes response,
  913.           or 1 for a no response.  It is typically used prior to executing
  914.           any action which may be destructive, such as erasing a file.  The
  915.           syntax is:
  916.  
  917.                CONFIRM {text_string}
  918.  
  919.           {text_string} can be up to 120 characters long, and can contain
  920.           any printable character.  Uppercase and lowercase characters are
  921.           preserved.  CONFIRM will display a header message, the
  922.           {text_string} followed by a question mark (?), then a footer
  923.           message prompting the user to press either the Y or N key.
  924.  
  925.           For example, the command line:
  926.  
  927.                CONFIRM Delete all the files
  928.  
  929.           will produce the display:
  930.  
  931.  
  932.                Do you wish to:
  933.  
  934.                     Delete all the files?
  935.  
  936.                Press 'Y' for YES or 'N' for NO
  937.  
  938.  
  939.  
  940.                                                                          10
  941.  
  942.  
  943.           Utility_Belt v1.1a                                Users' Guide
  944.           --------------------------------------------------------------
  945.  
  946.           Typical usage in a batch file (WIPEDISK.BAT) might be:
  947.  
  948.                REM ===   WIPEDISK.BAT
  949.                @ECHO OFF
  950.  
  951.                REM ===   ask user to confirm action before doing it
  952.                CONFIRM Delete all the files on %1
  953.                IF ERRORLEVEL 1 GOTO END
  954.                DELETE %1*.*
  955.                :END
  956.  
  957.           In this example with the command line WIPEDISK A:, if the user
  958.           pressed the N key for no, the batch file would branch to the :END
  959.           statement and nothing would happen.  If the Y for yes key was
  960.           pressed, the DOS command DELETE A:*.* would be performed to erase
  961.           everything on drive A:.
  962.  
  963.           If no parameters are specified on the command line, CONFIRM will
  964.           display a summary of its syntax.
  965.  
  966.  
  967.  
  968.           WAIT.COM
  969.  
  970.           WAIT will display a prompt and accept a key press.  If the <Esc>
  971.           is pressed, an ERRORLEVEL of 1 will be returned.  All other key
  972.           presses will produce an ERRORLEVEL of 0.  WAIT is used to pause a
  973.           batch file until a specific action is performed by the user, then
  974.           branch to one of two outcomes.  It is typically used prior to
  975.           executing any action which may require user intervention, such as
  976.           inserting a disk.  The syntax is:
  977.  
  978.                WAIT {text_string}
  979.  
  980.           {text_string} can be up to 120 characters long, and can contain
  981.           any printable character.  Uppercase and lowercase characters are
  982.           preserved.  WAIT will display a header message, the
  983.           {text_string}, then a footer message prompting the user to press
  984.           either the <Esc> key to quit or any other key to continue.
  985.  
  986.           For example, the command line:
  987.  
  988.                WAIT Insert disk in drive A:
  989.  
  990.           will produce the display:
  991.  
  992.  
  993.                Please:
  994.  
  995.                     Insert disk in drive A:
  996.  
  997.                Then press: <Esc> to ABORT or
  998.  
  999.                                                                          11
  1000.  
  1001.  
  1002.           Utility_Belt v1.1a                                Users' Guide
  1003.           --------------------------------------------------------------
  1004.  
  1005.                            any other key to CONTINUE
  1006.  
  1007.  
  1008.           Typical usage in a batch file (ALLCOPY.BAT) might be:
  1009.  
  1010.                REM ===   ALLCOPY.BAT
  1011.  
  1012.                @ECHO OFF
  1013.                WAIT Insert disk with files to copy in drive %1
  1014.                IF ERRORLEVEL 1 GOTO END
  1015.                COPY %1*.* %2
  1016.                :END
  1017.  
  1018.           To copy all the files from drive A: to drive C:, you would use
  1019.           the command:  ALLCOPY A: C:.  In this example, if the user
  1020.           pressed the <Esc> key to ABORT, the batch file would branch to
  1021.           the :END statement and nothing would happen.  If any other key
  1022.           was pressed, the DOS command COPY A:*.* C: would be performed to
  1023.           copy the file from the drive A: to drive C:.
  1024.  
  1025.           If no parameters are specified on the command line, WAIT will
  1026.           display a summary of its syntax.
  1027.  
  1028.  
  1029.  
  1030.           GETKEY.COM
  1031.  
  1032.           GETKEY waits for a key press from the keyboard and returns an
  1033.           ERRORLEVEL equal to the ASCII code of the key pressed.  GETKEY
  1034.           does not display any prompt.  The syntax is:
  1035.  
  1036.                GETKEY {key_mode}
  1037.  
  1038.           where {key_mode} can be any of:
  1039.  
  1040.             A  will accept all regular keys (numbers, symbols, letters,
  1041.                <Enter>, <Esc>) that have an ASCII code associated with
  1042.                them.  GETKEY will return an ERRORLEVEL value of 1 to 255
  1043.                corresponding to the ASCII code of the key pressed.  The
  1044.                'special' keys, such as the function keys, <PgUp>, <Home>,
  1045.                <End>, etc., will all return an ERRORLEVEL value of 0.
  1046.  
  1047.             #  will accept numeric keys only (numbers 0 to 9), either from
  1048.                the main keyboard or from the numeric keypad.  GETKEY will
  1049.                return an ERRORLEVEL value of 48 to 57, corresponding to the
  1050.                ASCII code for numerals 0 to 9.
  1051.  
  1052.             N  as with the # option, but will return an ERRORLEVEL value of
  1053.                0 to 9, corresponding to the numeric value of the key
  1054.                pressed.
  1055.  
  1056.  
  1057.  
  1058.                                                                          12
  1059.  
  1060.  
  1061.           Utility_Belt v1.1a                                Users' Guide
  1062.           --------------------------------------------------------------
  1063.  
  1064.           The ERRORLEVEL returned by GETKEY can be used by the batchfile to
  1065.           branch to an appropriate routine, or it can be ignored if just
  1066.           any key press is required to continue, like the DOS PAUSE
  1067.           command.  Unlike the DOS PAUSE command, however, GETKEY will not
  1068.           display a prompt.
  1069.  
  1070.           Typical usage in a batch file called DIRBC.BAT might be:
  1071.  
  1072.                REM ===    DIRBC.BAT
  1073.                @ECHO OFF
  1074.                REM ===    display directory of all batch files
  1075.                DIR %1*.BAT/w
  1076.                REM === wait until user presses a key to display .COM files
  1077.                ECHO Press any key to display .COM files
  1078.                GETKEY A
  1079.                REM ===    display directory of all .COM files
  1080.                DIR %1*.COM/W    
  1081.  
  1082.           This example ignores the ERRORLEVEL return code.  To view all the
  1083.           .BAT and .COM files on drive A: with this example, you would use:
  1084.  
  1085.                DIRBC A:
  1086.  
  1087.  
  1088.           If no parameters are specified on the command line, GETKEY will
  1089.           display a summary of its syntax.
  1090.  
  1091.  
  1092.           SLEEP.COM
  1093.  
  1094.           SLEEP is used to pause the execution of a batch file for a given
  1095.           length of time.  Optionally, a message may be displayed on the
  1096.           screen and/or a key press can be used to cancel the 'sleep'
  1097.           period.  Four separate forms of the command are available:
  1098.  
  1099.                SLEEP /N{nn}
  1100.  
  1101.                SLEEP /C{nn}
  1102.  
  1103.                SLEEP /T{nn};{message}
  1104.  
  1105.                SLEEP /K{nn};{message}
  1106.  
  1107.           In each case, {nn} is the sleep period in seconds (approximate). 
  1108.           {nn} must be an integer in the range of 1 to 65535.  With the
  1109.           /N{nn} option, SLEEP will wait for the specified length of time,
  1110.           then return control to the batch file.  The /C{nn} option is
  1111.           similar, but any key press will cancel the sleep and return to
  1112.           the batch file immediately.  The /T and /K options will display a
  1113.           message on the screen during the sleep period.  /T will wait the
  1114.           specified time, while /K can be cancelled with a key press. 
  1115.           {message} can be up to 120 characters long, and can contain any
  1116.  
  1117.                                                                          13
  1118.  
  1119.  
  1120.           Utility_Belt v1.1a                                Users' Guide
  1121.           --------------------------------------------------------------
  1122.  
  1123.           printable character.  Uppercase and lowercase characters are
  1124.           preserved.  The /T{nn} (or /K{nn}) and {message} must be
  1125.           separated by a semi-colon (;).
  1126.  
  1127.           For example:
  1128.  
  1129.                SLEEP /N10
  1130.  
  1131.           will pause the computer for about 10 seconds, then resume.
  1132.  
  1133.                SLEEP /C60
  1134.  
  1135.           will pause the computer for 60 seconds.  If at any time during
  1136.           this period, the user presses a key, the sleep period is
  1137.           immediately cancelled.
  1138.  
  1139.                SLEEP /T30;Waiting for 30 seconds . . .
  1140.  
  1141.           will display a header message, then "Waiting for 30 seconds . .
  1142.           ." and pause the computer for 30 seconds.
  1143.  
  1144.                SLEEP /K30;Waiting for 30 seconds . . .
  1145.  
  1146.           is similar to the previous example, except a key press can be
  1147.           used to cancel the sleep period.
  1148.  
  1149.           A typical usage in a batch file might be to display a greeting
  1150.           message on the screen just long enough to inform the user, then
  1151.           continue on with the batch file GOODMORN.BAT:
  1152.  
  1153.                REM ===   GOODMORN.BAT
  1154.  
  1155.                @ECHO OFF
  1156.                VPSTRIPE 0 V
  1157.                VPBOX 0 1 9 1 8 20 16 60
  1158.                VPAT 0 1 14 12 30 Good Morning !!
  1159.                SLEEP /C10
  1160.  
  1161.  
  1162.           (Note: the VPSTRIPE, VPBOX and VPAT commands are explained below
  1163.           in the video utilities section.)
  1164.  
  1165.           If no parameters are specified on the command line, SLEEP will
  1166.           display a summary of its syntax and options.
  1167.  
  1168.  
  1169.           BLEEP.COM
  1170.  
  1171.           Sounds a user defined tone (or series of tones) on the speaker. 
  1172.           BLEEP is typically used prior to any special alert or warning
  1173.           messages which are displayed by the batch file.  The syntax is:
  1174.  
  1175.  
  1176.                                                                          14
  1177.  
  1178.  
  1179.           Utility_Belt v1.1a                                Users' Guide
  1180.           --------------------------------------------------------------
  1181.  
  1182.                BLEEP {repeats} {freq} {length} {pause} [;{repeats} {freq}
  1183.                          {length} {pause}; ....]
  1184.  
  1185.           where:
  1186.  
  1187.           {repeats} is the number of times the note is to be repeated;
  1188.  
  1189.           {freq}    is the frequency of the note in Hertz (cycles per
  1190.                     second).  If no frequency is specified, a value of 1200
  1191.                     is assumed;
  1192.  
  1193.           {length}  is the duration of the note in 'system timer ticks'. 
  1194.                     There are approximately 18 timer ticks per second.  If
  1195.                     no length is specified, a value of 2 is assumed;
  1196.  
  1197.           {pause}   is the duration of the rest period between notes, in
  1198.                     system timer ticks.  If no pause is specified, a value
  1199.                     of 2 is assumed.
  1200.  
  1201.  
  1202.           For example, 
  1203.  
  1204.                BLEEP 2 1000 3 2
  1205.  
  1206.           will sound a 1000 Hz note for 3 timer ticks (~ 1/6 second) then
  1207.           wait for 2 timer ticks.
  1208.  
  1209.           Default values are provided for most of the parameters.  If the
  1210.           defaults are used, the only required parameter is the {count}
  1211.           value.  If all of the parameters are not specified, the command
  1212.           line must be terminated with a semi-colon (;).  For example:
  1213.  
  1214.                BLEEP 2;
  1215.  
  1216.           will sound a sequence of two default (1200 Hz) notes, each for a
  1217.           default time of 2 timer ticks followed by a default pause of 2
  1218.           timer ticks.
  1219.  
  1220.                BLEEP 2 800 3;
  1221.  
  1222.           will sound a sequence of 2 800 Hz notes for three ticks followed
  1223.           by a two tick pause.
  1224.  
  1225.           More than one tone can be sounded in a given sequence.  In this
  1226.           case each group of parameters must be separated by a semi-colon
  1227.           (;).   For example:
  1228.  
  1229.                BLEEP 1 400 2 1;2 600 3 2;1 800;2;
  1230.  
  1231.           will sound the following sequence of 6 notes:
  1232.  
  1233.             -  one note at 400 Hz for 2 ticks with a 1 tick pause;
  1234.  
  1235.                                                                          15
  1236.  
  1237.  
  1238.           Utility_Belt v1.1a                                Users' Guide
  1239.           --------------------------------------------------------------
  1240.  
  1241.             -  2 notes at 600 Hz for 3 ticks each with a 2 tick pause;
  1242.  
  1243.             -  1 note at 800 Hz for 3 ticks with a 2 tick pause;
  1244.  
  1245.             -  2 notes at 800 Hz for 3 ticks each with a 2 tick pause.
  1246.  
  1247.           Note that for a multiple tone sequence, if parameters are not
  1248.           specified, those used for the previous tone are assumed as the
  1249.           new default values.
  1250.  
  1251.  
  1252.           If no parameters are specified on the command line, BLEEP will
  1253.           display a summary of its syntax and options.
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.                                                                          16
  1295.  
  1296.  
  1297.           Utility_Belt v1.1a                                Users' Guide
  1298.           --------------------------------------------------------------
  1299.  
  1300.  
  1301.                                    VIDEO UTILITIES
  1302.  
  1303.  
  1304.           All video display adaptors, except for the original IBM
  1305.           Monochrome Display Adaptor (MDA) have the capability to access
  1306.           more than one video 'page'.  The Color Graphics Adaptor (CGA) has
  1307.           4 video pages in 80 column text mode, while the Enhanced Graphics
  1308.           Adaptor (EGA) and the Video Graphics Array (VGA) displays each
  1309.           have 8 video text pages.  Having more than one video page lets a
  1310.           user switch display screens instantly.  This can be used as an
  1311.           easy method to save output screens, create overlapping screen
  1312.           windows, etc.  Each page can have its own text, colors, cursor
  1313.           location, etc. and can be written to or erased without affecting
  1314.           the other pages.  Only one display page is visible at a time, but
  1315.           any page can be made visible, not just the default page (0). 
  1316.  
  1317.           Why don't many software programs take advantage of the multiple
  1318.           text pages that are available?  Probably the main reason is
  1319.           compatibility with older equipment.  In order to sell the most
  1320.           software, you design it to work on the 'lowest common
  1321.           denominator'.  In the case of video displays, this is the good
  1322.           old MDA, with its single display page.
  1323.  
  1324.           The video utilities in the Utility_Belt package provide a
  1325.           comprehensive set of tools to access all of the text mode video
  1326.           pages available on CGA, EGA and VGA displays.  With the exception
  1327.           of the instruction prompt printed by VPFLIP, none of the video
  1328.           utilities will display a header message of any kind when they are
  1329.           used.  This ensures that such messages do not encroach upon your
  1330.           video displays.
  1331.  
  1332.  
  1333.  
  1334.  
  1335.           VPSET.COM
  1336.  
  1337.           VPSET is used to set the current video display page for text
  1338.           modes.  VPSET is typically used to instantly switch to a a screen
  1339.           which was built in the background with the other video utilities
  1340.           (such as VPCOPY, VPBOX, VPAT, etc).  The syntax is:
  1341.  
  1342.                VPSET {video_page} [{cursor_line}]
  1343.  
  1344.  
  1345.           where:
  1346.           {video_page}   is the number of the video page to switch to; and
  1347.  
  1348.           {cursor_line}  is the screen line on the new page to place the
  1349.                          cursor. 
  1350.  
  1351.           {video_page} can have a value of 0 to 3 for the CGA display and 0
  1352.  
  1353.                                                                          17
  1354.  
  1355.  
  1356.           Utility_Belt v1.1a                                Users' Guide
  1357.           --------------------------------------------------------------
  1358.  
  1359.           to 7 for the EGA or VGA.  {cursor_line} normally has a value of 0
  1360.           to 24, with 0 being the top of the screen and 24 being the
  1361.           bottom.  On some EGA and VGA modes, {cursor_line} can be up to 49
  1362.           or more.  If {cursor_line} is omitted, line 0 (i.e. the top of
  1363.           the page) is assumed. 
  1364.  
  1365.           For example:
  1366.  
  1367.                VPSET 2 15
  1368.  
  1369.           will set the currently displayed video page to 2 and set the
  1370.           cursor on line 15.
  1371.  
  1372.           VPSET can be used to switch to a screen which has been built
  1373.           using other video commands.  When the VPSET command is issued, it
  1374.           will look as though the new screen appears instantly.  
  1375.  
  1376.           VPSET can also be used with normal DOS commands to change the
  1377.           screen where program output is displayed.  For example, the batch
  1378.           file SAVEDIR.BAT will keep a copy of the disk directory on video
  1379.           page 3:
  1380.  
  1381.                REM ===   SAVEDIR.BAT
  1382.                @ECHO OFF
  1383.                VPSET 3
  1384.                DIR %1*.*/W
  1385.                VPSET 0
  1386.  
  1387.           By using the command SAVEDIR A:, you can keep a copy of the
  1388.           directory of A: drive for future reference.  To see the directory
  1389.           again, use the command:
  1390.  
  1391.                VPSET 3 22
  1392.  
  1393.           The directory will be instantly displayed and you do not even
  1394.           have to have the disk still in your drive!  To switch back to the
  1395.           normal screen, use the command:
  1396.  
  1397.                VPSET 0
  1398.  
  1399.           (In the above example, you could also use the command VPFLIP (see
  1400.           below) to flip through several video pages and display their
  1401.           contents in sequence.)
  1402.  
  1403.           If no parameters are specified on the command line, VPSET will
  1404.           display a summary of its syntax and options.
  1405.  
  1406.  
  1407.  
  1408.           VPCOPY.COM
  1409.  
  1410.           VPCOPY will copy the contents of one video text page to another,
  1411.  
  1412.                                                                          18
  1413.  
  1414.  
  1415.           Utility_Belt v1.1a                                Users' Guide
  1416.           --------------------------------------------------------------
  1417.  
  1418.           complete with all screen attributes (colors).  This allows a text
  1419.           page to be saved then recalled later.  It also allows multiple
  1420.           copies of a page to be created, each of which can then be
  1421.           modified without affecting the others (e.g. for creating a series
  1422.           of seemingly overlapping pop-up windows).  The syntax is:
  1423.  
  1424.                VPCOPY {from_page} {to_page}
  1425.  
  1426.           where: 
  1427.  
  1428.           {from_page}    is the video page being copied from; and 
  1429.  
  1430.           {to_page}      is the page being copied to.  
  1431.  
  1432.           Note that any existing contents of the {to_page} will be
  1433.           destroyed.  Both {from_page} and {to_page} have a range of 0 to 3
  1434.           for the CGA display and 0 to 7 for the EGA and VGA displays.
  1435.  
  1436.           For example:
  1437.  
  1438.                VPCOPY 0 2
  1439.  
  1440.           will copy the contents of video page 0 to page 2.  Try the
  1441.           following short command sequence, either in a batch file or by
  1442.           typing it in directly on the command line:
  1443.  
  1444.                CLS
  1445.                DIR/W
  1446.                VPSET 2
  1447.                CLS
  1448.                VPCOPY 0 2
  1449.  
  1450.           What you will see after the VPCOPY step is the directory that was
  1451.           originally displayed on the other page suddenly appearing. 
  1452.           (Don't forget to go back to the default page with a VPSET 0 when
  1453.           you are done.)
  1454.  
  1455.           If no parameters are specified on the command line, VPCOPY will
  1456.           display a summary of its syntax and options.
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.           VPFLIP.COM
  1465.  
  1466.           VPFLIP will let the user flip instantly between alternate display
  1467.           pages that have been created with the other video commands.  Up
  1468.           to eight video pages can be displayed in any sequence.  When
  1469.           exiting VPFLIP, you are returned to the original video page (i.e.
  1470.  
  1471.                                                                          19
  1472.  
  1473.  
  1474.           Utility_Belt v1.1a                                Users' Guide
  1475.           --------------------------------------------------------------
  1476.  
  1477.           the display page which was showing when the VPFLIP command was
  1478.           issued), which need not be in the sequence that was flipped
  1479.           through.  The syntax is:
  1480.  
  1481.                VPFLIP {first_page} [{second_page} {third_page} ...
  1482.                         {eighth_page}]
  1483.  
  1484.           where {first_page}, {second_page}, etc. are the video pages to be
  1485.           flipped through.  These pages can be in any order, and will be
  1486.           displayed in the sequence that they are entered on the command
  1487.           line.  For example,  the command line:
  1488.  
  1489.                VPFLIP 1 4 7 2 6
  1490.  
  1491.           will display page 1, followed by 4, then 7, 2, 6 and back to 1
  1492.           again.  The <PgDn> key is used to go to the next page in the
  1493.           sequence and <PgUp> is used to go to the previous page.  <Esc> is
  1494.           used to quit VPFLIP and return to the original video page.  A
  1495.           prompt message is displayed in black on white text on line 24 of
  1496.           each page.
  1497.  
  1498.           Note: when using VPFLIP, line 24 of the pages being flipped
  1499.           through is erased by the prompt message.  Line 24 of the original
  1500.           page, if it was erased as part of the flip sequence, is restored
  1501.           when exiting VPFLIP.
  1502.  
  1503.           VPFLIP is typically used to create a mini 'slide show' to display
  1504.           a number of screens, or to view output screens that were
  1505.           redirected with the VPSET command.
  1506.  
  1507.           If no parameters are specified on the command line, VPCOPY will
  1508.           display a summary of its syntax and options.
  1509.  
  1510.  
  1511.  
  1512.           VPCLS.COM
  1513.  
  1514.           The DOS CLS (CLear Screen) command is designed to clear the
  1515.           screen (i.e. erase the contents of the screen and put the cursor
  1516.           on the top line) of the currently active video page to the
  1517.           default colors (usually white on black, unless this has been
  1518.           changed by a special utility or driver such as ANSI.SYS).  It has
  1519.           no effect on any page other than the currently active page. 
  1520.           VPCLS will clear any specified video page, to any specified
  1521.           combination of colors that is supported by your display adpator. 
  1522.           The syntax is:
  1523.  
  1524.                VPCLS {video_page} [{background_color} {foreground_color}]
  1525.  
  1526.           where: 
  1527.  
  1528.           {video_page}   is the display page to be cleared (0 only for the
  1529.  
  1530.                                                                          20
  1531.  
  1532.  
  1533.           Utility_Belt v1.1a                                Users' Guide
  1534.           --------------------------------------------------------------
  1535.  
  1536.                          MDA, 0 to 3 for the CGA, 0 to 7 for the EGA or
  1537.                          VGA); and 
  1538.  
  1539.           {background_color} and {foreground_color} are the screen
  1540.                          colors to set. 
  1541.  
  1542.           The colors are optional.  For the MDA, they must be either 0
  1543.           (black) or 7 (white).  (Even with the MDA, it is still possible
  1544.           to get black on white rather than the normal white on black.) 
  1545.           For the CGA, EGA and VGA adaptors, color values of 0 to 7 are
  1546.           available for {background_color} and 0 to 15 for
  1547.           {foreground_color}.  If they are not specified, white text on a
  1548.           black background is assumed.  If only the {background_color} is
  1549.           specified, white is assumed for the {foreground_color}.  The
  1550.           acceptable color values are listed in the following table:
  1551.  
  1552.           Table 1: Screen Colors
  1553.           --------------------+--------------------
  1554.                Color Value         Color
  1555.           --------------------+--------------------
  1556.                  0                 Black
  1557.                  1                 Blue
  1558.                  2                 Green
  1559.                  3                 Cyan
  1560.                  4                 Red
  1561.                  5                 Magenta
  1562.                  6                 Brown
  1563.                  7                 White                Note: the 'bright' colors
  1564.                  8                 Gray (Bright Black)        (8 to 15) can be
  1565.                  9                 Bright Blue                used for foreground
  1566.                 10                 Bright Green               choices only.
  1567.                 11                 Bright Cyan
  1568.                 12                 Bright Red
  1569.                 13                 Bright Magenta
  1570.                 14                 Yellow (Bright Brown)
  1571.                 15                 Bright White
  1572.           --------------------+--------------------
  1573.  
  1574.           (Note: This color table is used by all of the video commands
  1575.           which require colors to be specified.)
  1576.  
  1577.           For example:
  1578.  
  1579.                VPCLS 1 
  1580.  
  1581.           will clear video page 1 to white on black. 
  1582.  
  1583.                VPCLS 3 5 14
  1584.  
  1585.           will clear video page 3 to yellow on magenta.
  1586.  
  1587.                VPCLS 2 3
  1588.  
  1589.                                                                          21
  1590.  
  1591.  
  1592.           Utility_Belt v1.1a                                Users' Guide
  1593.           --------------------------------------------------------------
  1594.  
  1595.           will clear video page 2 to white on cyan.
  1596.  
  1597.           If no parameters are specified on the command line, VPCLS will
  1598.           display a summary of its syntax and options.
  1599.  
  1600.  
  1601.           VPSTRIPE.COM
  1602.  
  1603.           Similar to the DOS CLS command, VPCLS will clear a screen to a
  1604.           single pair of background and foreground colors.  For visual
  1605.           effect, VPSTRIPE will produce a striped or rainbow pattern on the
  1606.           screen.  Stripes can be horizontal or vertical in any combination
  1607.           of colors.  The striped screen can then be used as a background
  1608.           for text windows produced with the VPBOX and VPAT commands.  The
  1609.           syntax is:
  1610.  
  1611.                VPSTRIPE {video_page} {stripe_mode} [{color_1} {color_2}]
  1612.  
  1613.           where:
  1614.  
  1615.           {video_page}   is the display page to be cleared with stripes (0
  1616.                          only for the MDA, 0 to 3 for the CGA, 0 to 7 for
  1617.                          the EGA or VGA); 
  1618.  
  1619.           {stripe_mode}  is H for horizontal stripes or V for vertical
  1620.                          stripes.
  1621.  
  1622.           {color_1} and {color_2} are the screen colors to set for a two
  1623.           color stripe pattern.  Color values of 0 to 15 can be specified
  1624.           for each color.  The color values are listed above under the
  1625.           VPCLS command and are optional.  If they are not specified, a 16
  1626.           color rainbow pattern is used with colors shown in the order of
  1627.           the above color table.  
  1628.  
  1629.           VPSTRIPE creates stripes by printing a line of 'block' characters
  1630.           (ASCII code 219) in the specified color, using black as the
  1631.           'background' color.  Using this method allows 16 color stripes to
  1632.           be displayed, not just the 8 normal background colors.  When text
  1633.           is subsequently printed directly on the striped background, the
  1634.           text will be shown as the stripe color on a black background. 
  1635.           However, in the case of rainbow screens, text will not show up on
  1636.           the black stripes (i.e. they will be printed black on black).
  1637.  
  1638.           If no parameters are specified on the command line, VPSTRIPE will
  1639.           display a summary of its syntax and options.
  1640.  
  1641.  
  1642.  
  1643.           VPTNT.COM
  1644.  
  1645.           The standard method to clear the video display (i.e. CLS or
  1646.           VPCLS) produces a rather boring video effect for anyone who may
  1647.  
  1648.                                                                          22
  1649.  
  1650.  
  1651.           Utility_Belt v1.1a                                Users' Guide
  1652.           --------------------------------------------------------------
  1653.  
  1654.           be watching it.  Sometimes, you may want to have the screen
  1655.           clearing process as part of the overall visual impact of the
  1656.           batch file.  Utility_Belt offers two programs to produce a
  1657.           visually more interesting screen clearing effect:  VPTNT and
  1658.           VPBH.  Since each of these programs is designed for a visual
  1659.           effect, they work only with the currently active screen page. 
  1660.           However, they work with any active screen page set by the VPSET
  1661.           command, not just the default page 0.  
  1662.  
  1663.           VPTNT will clear the current screen to the specified colors in an
  1664.           explosive effect (i.e. any existing text on the screen appears to
  1665.           be flung out from the center of the screen to the edges).  The
  1666.           syntax is:
  1667.  
  1668.                VPTNT {background_color} {foreground_color} [S]
  1669.  
  1670.           where {background_color} and {foreground_color} are chosen from
  1671.           the list given above for the VPCLS command.  With fast computers
  1672.           and video display cards, you may wish to slow down the screen
  1673.           clearing process to make it more visible.  If the optional S
  1674.           parameter is included, the screen is cleared in 'slow' mode. 
  1675.           With slow mode, the screen is cleared over a time span of about 2
  1676.           seconds, compared to the fractions of a second required for fast
  1677.           mode.
  1678.  
  1679.           For example:
  1680.  
  1681.                VPTNT 1 14
  1682.  
  1683.           will quickly 'explode' the screen to yellow on blue.
  1684.  
  1685.                VPTNT 2 7 S
  1686.  
  1687.           will slowly 'explode' the screen to white on green.
  1688.  
  1689.           For maximum explosive effect with VPTNT, we recommend that you
  1690.           use fast mode.
  1691.  
  1692.           If no parameters are specified on the command line, VPTNT will
  1693.           display a summary of its syntax and options.
  1694.  
  1695.  
  1696.  
  1697.           VPBH.COM
  1698.  
  1699.           The second visual effect is VPBH, which will clear the screen
  1700.           with a 'black hole' implosion effect (i.e. any existing text on
  1701.           the screen seems to be sucked in to the center of the screen). 
  1702.           The syntax is:
  1703.  
  1704.                VPBH {background_color} {foreground_color} [S]
  1705.  
  1706.  
  1707.                                                                          23
  1708.  
  1709.  
  1710.           Utility_Belt v1.1a                                Users' Guide
  1711.           --------------------------------------------------------------
  1712.  
  1713.           where {background_color} and {foreground_color} are chosen from
  1714.           the list given above for the VPCLS command.  With fast computers
  1715.           and video display cards, you may wish to slow down the screen
  1716.           clearing process to make it more visible.  If the optional S
  1717.           parameter is included, the screen is cleared in 'slow' mode. 
  1718.           With slow mode, the screen is cleared over a time span of about 2
  1719.           seconds, compared to the fractions of a second required for fast
  1720.           mode.
  1721.  
  1722.           For example:
  1723.  
  1724.                VPBH 1 14
  1725.  
  1726.           will quickly 'implode' the screen to yellow on blue.
  1727.  
  1728.                VPBH 2 7 S
  1729.  
  1730.           will slowly 'implode' the screen to white on green.
  1731.  
  1732.           If no parameters are specified on the command line, VPBH will
  1733.           display a summary of its syntax and options.
  1734.  
  1735.  
  1736.           VPAT.COM
  1737.  
  1738.           Without using a special device driver like ANSI.SYS, DOS cannot
  1739.           print a message at a user selected spot on the screen.  This
  1740.           makes it very difficult to build windowed menus and other types
  1741.           of display screens which require text to be printed at a specific
  1742.           location on the screen.  Even with ANSI.SYS installed, you are
  1743.           limited to printing on the currently displayed screen page.  VPAT
  1744.           wil print a text string at a specified location on any video
  1745.           page.  The syntax is:
  1746.  
  1747.                VPAT {video_page} {background_color} {foreground_color}
  1748.                          {row} {column} {text}
  1749.  
  1750.           where:
  1751.  
  1752.           {video_page}   is the display page to be printed on (0 only for
  1753.                          the MDA, 0 to 3 for the CGA, 0 to 7 for the EGA or
  1754.                          VGA); 
  1755.  
  1756.           {background_color} and {foreground_color} are the screen colors
  1757.                          to use.  The values are given above for the
  1758.                          description of VPCLS;
  1759.  
  1760.           {row}          is the screen row (line) to print on.  Rows 0 to
  1761.                          24 are supported on all display adpators.  Special
  1762.                          video modes (like 50 line VGA mode) have other
  1763.                          maximum values.
  1764.  
  1765.  
  1766.                                                                          24
  1767.  
  1768.  
  1769.           Utility_Belt v1.1a                                Users' Guide
  1770.           --------------------------------------------------------------
  1771.  
  1772.           {column}       is the screen column to start printing at. 
  1773.                          Columns 0 to 79 are supported on all display
  1774.                          adpators.  Special video modes (like 130 colum VGA
  1775.                          mode) have other maximum values.
  1776.  
  1777.           {text}         is the text string to be printed.  It can be up to
  1778.                          about 100 characters long  (although with the
  1779.                          screen width limitation of most video modes, i.e.
  1780.                          80 columns, it will normally be much less) and can
  1781.                          contain any printable character.  Embedded spaces
  1782.                          are allowed, but leading spaces are automatically
  1783.                          removed.  Uppercase and lowercase characters are
  1784.                          preserved.  
  1785.  
  1786.           Note: If {text} is longer than the amount of space remaining on
  1787.           the chosen screen line, it will 'wrap' around to the next screen
  1788.           line starting at the column specified by the {column} parameter.
  1789.  
  1790.           For example:
  1791.  
  1792.                VPAT 1 2 15 10 20 Hello !!
  1793.  
  1794.           will print the text "Hello !!" on video page 1, starting at line
  1795.           10, column 20 in bright white letters on green.
  1796.  
  1797.                VPAT 0 1 14 10 70 This is a long line
  1798.  
  1799.           will print the text "This is a" on line 10 starting at column 70,
  1800.           followed by "long line" on line 11, starting at column 70.
  1801.  
  1802.           If no parameters are specified on the command line, VPAT will
  1803.           display a summary of its syntax and options.
  1804.  
  1805.  
  1806.  
  1807.           VPBOX.COM
  1808.  
  1809.           It is often desirable to 'frame' messages and text in a box on
  1810.           the screen to make it stand out (or to produce a series of
  1811.           'windows').  VPBOX draws a box of a given size at a given
  1812.           location on the screen.  It is typically used prior to VPAT to
  1813.           create message windows on a screen.  The syntax is:
  1814.  
  1815.                VPBOX {video_page} {background_color} {foreground_color}
  1816.                          {style} {top_line} {bot_line} {left_col}
  1817.                          {right_col}
  1818.  
  1819.           where:
  1820.  
  1821.           {video_page}   is the display page to create the box on (0 only
  1822.                          for the MDA, 0 to 3 for the CGA, 0 to 7 for the
  1823.                          EGA or VGA); 
  1824.  
  1825.                                                                          25
  1826.  
  1827.  
  1828.           Utility_Belt v1.1a                                Users' Guide
  1829.           --------------------------------------------------------------
  1830.  
  1831.           {background_color} and {foreground_color} are the screen colors
  1832.                          to use.  The values are given above for the
  1833.                          description of VPCLS;
  1834.  
  1835.           {style}        is the type of line to draw around the box, as
  1836.                          given in the table below.  A total of 26 line
  1837.                          styles are supported.  Styles 0 to 8 are lines in
  1838.                          the normal sense, while styles 9 to 25 are borders
  1839.                          composed of various specialty characters.
  1840.  
  1841.           {top_line}     is the screen line (row) for the top of the box. 
  1842.                          Lines 0 to 24 are supported on all display
  1843.                          adpators.  Special video modes (like 50 line VGA
  1844.                          mode) have other maximum values.
  1845.  
  1846.           {bot_line}     is the screen line for the bottom of the box. 
  1847.                          Lines 0 to 24 are supported on all display
  1848.                          adpators.  Special video modes (like 50 line VGA
  1849.                          mode) have other maximum values.  {bot_line} must
  1850.                          be greater than {top_line}.
  1851.            
  1852.           {left_col}     is the screen column for the left side of the box.
  1853.                          Columns 0 to 79 are supported on all display
  1854.                          adpators.  Special video modes (like 130 colum VGA
  1855.                          mode) have other maximum values.
  1856.  
  1857.           {right_col}    is the screen column for the right side of the
  1858.                          box. Columns 0 to 79 are supported on all display
  1859.                          adpators.  Special video modes (like 130 colum VGA
  1860.                          mode) have other maximum values.  {right_col} must
  1861.                          be greater than {left_col}.
  1862.  
  1863.  
  1864.           Note: Unpredictable results (i.e. scrambled screen images) will
  1865.           occur if the line and column parameters are beyond the rage
  1866.           normally supported by your video adaptor.
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.                                                                          26
  1885.  
  1886.  
  1887.           Utility_Belt v1.1a                                Users' Guide
  1888.           --------------------------------------------------------------
  1889.  
  1890.  
  1891.           Table 2: Border Styles
  1892.           ----------------+---------------------------------
  1893.                Box Style      Line Type
  1894.           ----------------+---------------------------------
  1895.                0              no lines
  1896.                1              thin single lines
  1897.                2              thin double lines
  1898.                3              single horizontal, double vertical
  1899.                4              double horizontal, single vertical
  1900.                5              thick solid lines
  1901.                6              light checkered thick lines
  1902.                7              medium checkered thick lines
  1903.                8              dark checkered thick lines
  1904.                9              smiling face
  1905.                10             reverse smiling face
  1906.                11             heart
  1907.                12             diamond
  1908.                13             club
  1909.                14             spade
  1910.                15             dot
  1911.                16             reverse dot
  1912.                17             circle
  1913.                18             reverse circle
  1914.                19             sinlge musical note
  1915.                20             double musical note
  1916.                21             sun
  1917.                22             square
  1918.                23             small circle
  1919.                24             medium dot
  1920.                25             small dot
  1921.           ----------------+---------------------------------
  1922.  
  1923.           For example:
  1924.  
  1925.                VPBOX 0 4 7 1 7 20 4 54
  1926.  
  1927.           will draw a single lined box on video page 0, white on red, with
  1928.           the top left at row 7, column 4 and the bottom right at row 20,
  1929.           column 54.
  1930.  
  1931.           Overlapping boxes can be created by using multiple VPBOX
  1932.           commands.  The most recently issued VPBOX command will be the top
  1933.           layer.  For example, the following sequence will create a blue on
  1934.           white window with a black 'shadow' from 2 VPBOX commands:
  1935.  
  1936.                VPBOX 0 0 0 0 5 20 20 40
  1937.                VPBOX 0 1 7 1 6 21 21 41
  1938.  
  1939.           If no parameters are specified on the command line, VPBOX will
  1940.           display a summary of its syntax and options.
  1941.  
  1942.  
  1943.                                                                          27
  1944.  
  1945.  
  1946.           Utility_Belt v1.1a                                Users' Guide
  1947.           --------------------------------------------------------------
  1948.  
  1949.  
  1950.                           SECURITY AND DIAGNOSTIC UTILITIES
  1951.  
  1952.  
  1953.           An increasing number of computers in business and educational
  1954.           environments are being interconnected through Local Area Networks
  1955.           (LAN's) and Wide Area Networks (WAN's).  Although this
  1956.           interconnection offers many advantages, it also offers some
  1957.           disadvantages, namely: data security concerns and access to
  1958.           system level resources.
  1959.  
  1960.           Many area network administrators prefer to keep users totally
  1961.           isolated from the DOS command line.  All programs and data are
  1962.           accessed through established network menu systems, which are
  1963.           controlled by the network administrator.  However, one of the
  1964.           main security concerns occurs before a user is connected or
  1965.           logged in to the network.  Each workstation usually contains a
  1966.           hard disk and perhaps even one or more floppy drives.  If the
  1967.           user chooses not to log into the network, they usually have full
  1968.           access to whatever is stored on these devices.
  1969.  
  1970.           The two security programs included in the Utility_Belt collection
  1971.           can be used to keep casual observers away from the DOS command
  1972.           line in these types of situtations.  Note that, as with any
  1973.           security system, it is far from being unbreakable, but it is
  1974.           usually sufficient to keep out all casual snoop and scare off a
  1975.           good many determined hackers as well.
  1976.  
  1977.  
  1978.           HANG.COM
  1979.  
  1980.           As its name implies, HANG will simply lockup the computer, and
  1981.           require a cold reset (i.e. power off, then power on) to restart
  1982.           the system.  The syntax is:
  1983.  
  1984.                HANG [/Q;] {message}
  1985.  
  1986.           where:
  1987.  
  1988.           {message} is a text message to be displayed on the screen while
  1989.                     it is locked up.  It can be up to about 120 characters
  1990.                     long  (although with the screen width limitation of
  1991.                     most video modes, i.e. 80 columns, it will normally be
  1992.                     much less) and can contain any printable character. 
  1993.                     Embedded spaces are allowed, but leading spaces are
  1994.                     automatically removed.  Uppercase and lowercase
  1995.                     characters are preserved.  
  1996.  
  1997.           /Q;       specifies the optional 'quiet' mode.  If /Q is NOT
  1998.                     used, an alarm tone will also be sounded during the
  1999.                     lockup.
  2000.  
  2001.  
  2002.                                                                          28
  2003.  
  2004.  
  2005.           Utility_Belt v1.1a                                Users' Guide
  2006.           --------------------------------------------------------------
  2007.  
  2008.           For example:
  2009.  
  2010.                HANG /Q; Security Violation
  2011.  
  2012.           will lockup the computer while displaying the message "Security
  2013.           Violation" on the screen.
  2014.  
  2015.                HANG Security Violation
  2016.  
  2017.           will lockup the computer while displaying the message "Security
  2018.           Violation" on the screen and sounding an audio alarm tone.
  2019.  
  2020.           HANG may be used as part of a network login procedure such as:
  2021.  
  2022.                @ECHO OFF
  2023.                REM ===  Use your own standard login procedure or command
  2024.                LOGIN
  2025.                REM ===  Check for Login Error
  2026.                IF ERRORLEVEL 1 GOTO HANG
  2027.                REM ===  Exit normally if successful
  2028.                GOTO END
  2029.                REM ===  Otherwise, lockup
  2030.                :HANG
  2031.                HANG Security Violation - Network Access Denied
  2032.                :END
  2033.  
  2034.  
  2035.           If no parameters are specified on the command line, HANG will
  2036.           display a summary of its syntax and options.
  2037.  
  2038.  
  2039.  
  2040.           REBOOT.COM
  2041.  
  2042.           REBOOT will perform a software controlled re-booting of the
  2043.           computer.  The syntax is:
  2044.  
  2045.                REBOOT {message}    or
  2046.  
  2047.                REBOOT /N
  2048.  
  2049.  
  2050.           where:
  2051.  
  2052.           {message} is a text message to be displayed on the screen before
  2053.                     rebooting.  It can be up to about 120 characters long 
  2054.                     (although with the screen width limitation of most
  2055.                     video modes, i.e. 80 columns, it will normally be much
  2056.                     less) and can contain any printable character. 
  2057.                     Embedded spaces are allowed, but leading spaces are
  2058.                     automatically removed.  Uppercase and lowercase
  2059.                     characters are preserved.  
  2060.  
  2061.                                                                          29
  2062.  
  2063.  
  2064.           Utility_Belt v1.1a                                Users' Guide
  2065.           --------------------------------------------------------------
  2066.  
  2067.           /N        specifies the optional 'no wait' mode.  If /N is used,
  2068.                     reboot is immediate without displaying any message.
  2069.  
  2070.           For example:
  2071.  
  2072.                REBOOT Resetting the computer ... Please Wait
  2073.  
  2074.           will display the message "Resetting the computer ... Please
  2075.           Wait", then re-boot the computer after a short delay.
  2076.  
  2077.           REBOOT may be used as part of a network login procedure such as:
  2078.  
  2079.                @ECHO OFF
  2080.                REM ===  Use your own standard login procedure or command
  2081.                LOGIN
  2082.                REM ===  Check for Login Error
  2083.                IF ERRORLEVEL 1 GOTO REBOOT
  2084.                REM ===  Exit normally if successful
  2085.                GOTO END
  2086.                REM ===  Otherwise, lockup
  2087.                :REBOOT
  2088.                REBOOT Security Violation - Network Access Denied
  2089.                :END
  2090.  
  2091.  
  2092.           REBOOT can also be used to change the system configuration by
  2093.           keeping multiple copies of the AUTOEXEC.BAT or CONFIG.SYS files. 
  2094.           For example, if you had several different AUTOEXEC.BAT or
  2095.           CONFIG.SYS files with different drivers, or memory
  2096.           configurations, etc., you could use a short batch file menu to
  2097.           select which one you wanted.  For example:
  2098.  
  2099.                REM ===  SELAUTO.BAT
  2100.                @ECHO OFF
  2101.  
  2102.                REM ===  SELECT startup mode
  2103.                SELECT Startup Options; WINDOWS; DOS; NETWORK
  2104.                IF ERRORLEVEL 3 GOTO NETWORK
  2105.                IF ERRORLEVEL 2 GOTO DOS
  2106.                IF ERRORLEVEL 1 GOTO WINDOWS
  2107.                GOTO END
  2108.  
  2109.                REM ===  COPY correct files to AUTOEXEC.BAT and CONFIG.SYS
  2110.                :WINDOWS
  2111.                COPY AUTOEXEC.WIN AUTOEXEC.BAT
  2112.                COPY CONFIG.WIN CONFIG.SYS
  2113.                GOTO BOOT
  2114.                :DOS
  2115.                COPY AUTOEXEC.DOS AUTOEXEC.BAT
  2116.                COPY CONFIG.DOS CONFIG.SYS
  2117.                GOTO BOOT
  2118.                :NETWORK
  2119.  
  2120.                                                                          30
  2121.  
  2122.  
  2123.           Utility_Belt v1.1a                                Users' Guide
  2124.           --------------------------------------------------------------
  2125.  
  2126.                COPY AUTOEXEC.NET AUTOEXEC.BAT
  2127.                COPY CONFIG.NET CONFIG.SYS
  2128.  
  2129.                REM === Reboot the using new AUTOEXEC and CONFIG files
  2130.                :BOOT
  2131.                REBOOT Setting up system configuration ... Please wait
  2132.                :END
  2133.  
  2134.  
  2135.  
  2136.           If no parameters are specified on the command line, REBOOT will
  2137.           display a summary of its syntax and options.
  2138.  
  2139.  
  2140.  
  2141.  
  2142.           WHATIS.COM
  2143.  
  2144.           Many different device drivers and configuration programs exist
  2145.           that can modify the way the operating system interfaces with the
  2146.           hardware.  Usually, things work OK, but when problems occur on a
  2147.           system, it is often difficult to figure out who is saying what to
  2148.           whom.  When it comes to disk drives (floppy disks, hard disks,
  2149.           etc) both local, and shared network resources, WHATIS will tell
  2150.           you what the various components of the operating system are
  2151.           reporting to each other.  The syntax is:
  2152.  
  2153.                WHATIS {logical_drive}
  2154.  
  2155.           where {logical_drive} is the drive letter assigned to the logical
  2156.           device.  For example:
  2157.  
  2158.                WHATIS A
  2159.  
  2160.           will report the physical and logical parameters associated with
  2161.           drive A:, as reported by the various DOS and BIOS routines.  A
  2162.           number of parameters are checked and reported, such as:
  2163.  
  2164.             -  total number of floppy drives on system as reported by the
  2165.                BIOS equipment list word at 0040:0010
  2166.  
  2167.             -  physical device number used by the BIOS disk interrupt 13 to
  2168.                address the device
  2169.  
  2170.             -  type of device (i.e. 360k, 1.2 meg, hard disk, etc) as
  2171.                reported by the BIOS (usually from the CMOS RAM) and DOS
  2172.                (usually from device drivers).  Normally these are the same,
  2173.                but may be different if a device driver is being used.
  2174.  
  2175.             -  whether the device is local or remote (i.e. a network drive)
  2176.  
  2177.             -  whether the media is removable
  2178.  
  2179.                                                                          31
  2180.  
  2181.  
  2182.           Utility_Belt v1.1a                                Users' Guide
  2183.           --------------------------------------------------------------
  2184.  
  2185.             -  whether the device is 'shared' with another logical drive
  2186.  
  2187.             -  if a hard disk or network drive, the size of the drive and
  2188.                amount of free space available.
  2189.  
  2190.           If no parameters are specified on the command line, WHATIS will
  2191.           display a summary of its syntax and options.
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.                                                                          32